package com.atguigu.campusintelligentassistantsystem.repository;

import com.atguigu.campusintelligentassistantsystem.entity.NoticeFavorite;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface NoticeFavoriteRepository extends JpaRepository<NoticeFavorite, Long> {
    List<NoticeFavorite> findByUserIdOrderByFavoriteTimeDesc(Long userId);
    NoticeFavorite findByUserIdAndNoticeId(Long userId, Long noticeId);
}